home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / UTILENUS / DOSMENU.LZH / DOSMENU.DOC < prev    next >
Text File  |  1991-05-29  |  9KB  |  232 lines

  1. DOSMENU
  2.  
  3. |    NOTE:
  4. |    Changes to this document since version 1.00 are marked with a '|'
  5. |    to the left of the changed or new line.
  6.  
  7.  
  8.  Description
  9.  
  10.      DOSMENU is a program which displays a menu of options, and
  11.      allows one to be selected. The commands for that option are
  12.      executed, then the menu is re-displayed. This allows programs
  13.      to be used easily, without having to remember the particular
  14.      combination of DOS commands required to run them.
  15.  
  16.  
  17.  Command Format
  18.  
  19.      dosmenu [menufile]
  20.  
  21.      DOSMENU uses the file DOSMENU.TXT by default. DOSMENU.TXT contains
  22.      a description of the options displayed on the menu, and the commands
  23.      executed by each option. Any number of files can be set up for use
  24.      with DOSMENU. To use one of these alternate files, specify the name
  25.      of the file on the command line, and the alternate file will be used.
  26.  
  27.  
  28.  Setting up the menu description file
  29.  
  30.      For example, say that we want to be able to use the LD program
  31.      from the menu. Assume that LD is on your C drive, in the directory
  32.      DOS. To use a program from a menu, we first need to enter it into
  33.      the menu, in this manner:
  34.  
  35.      1) Edit the file DOSMENU.TXT.  SBE may be used for this purpose by
  36.         entering:
  37.  
  38.           sbe dosmenu.txt
  39.  
  40.        SBE is included in DABUTIL, which is available from Simian Id Software.
  41.  
  42.      2) Add these lines to the file: If DOSMENU.TXT already has something
  43.         in it, then add these lines to the end. If the menu entry for
  44.         "A" has already been used, then use a different letter.
  45.  
  46.          A
  47.          List all the directories on this disk
  48.          C:\DOS\LD;
  49.          PAUSE
  50.  
  51.      The first character of the first line is the menu option letter.
  52.      You may any printable character here, such as A, M, 0, 1, @, #, &,
  53.      and so forth. A character may be use only once.
  54.  
  55.      The second line is the description that will displayed when the
  56.      menu is on the screen.
  57.  
  58.  
  59.  
  60.      The third and following lines are DOS commands that are needed to
  61.      run the program. The final DOS command, "PAUSE", will leave the
  62.      display on the screen until you press a key, so that you can see
  63.      the display before returning to the menu. In this case, two
  64.      commands are required, so the first one ends with ';' to indicate that
  65.      more commands follow. Whenever more than one command is required, use
  66.      a semicolon (;) on all commands except for the last.
  67.  
  68.      This is the general format used in DOSMENU.TXT to set up a menu:
  69.  
  70.      A
  71.      Description
  72.      Command
  73.      B
  74.      Description
  75.      Command1;
  76.      Command2;
  77.      Command3
  78.      C
  79.      Description
  80.      #Command1;
  81.      Command2
  82. |    D
  83. |    Description
  84. |    %a prompt 1;
  85. |    Command1;
  86. |    Command2;
  87. |    Command3
  88. |    E
  89. |    Description
  90. |    #%a prompt 1;
  91. |    %b prompt 2;
  92. |    Command1;
  93. |    Command2;
  94. |    Command3
  95.  
  96.  
  97.          .
  98.          .
  99.          .
  100.  
  101.      Each item to be displayed on your menu requires:
  102.          1 - A character to be entered by the user.
  103.          2 - A description to be shown to the user.
  104.          3 - The command or commands, as you would enter them at the
  105.              DOS prompt, including any arguments. If there are more
  106.              commands than one to execute for the option, follow each
  107.              with a semicolon (;) except for the last one.
  108.  
  109.      These three things must be entered for each option, on separate
  110.      lines, in the order given. The first option can be any printable
  111.      character: letter, number or any character that you can type at
  112.      the keyboard.
  113.  
  114.      If a pound sign precedes the first command in the sequence, DOSMENU
  115.      recognizes that it should release all the memory it uses before it
  116.      executes the commands. It is known as the "zero-RAM" option, since
  117.      DOSMENU uses no memory when executing programs in this way. The third
  118.      menu option specified above uses the "zero-RAM" option. It is useful for
  119.      large programs which would not execute unless they have all your
  120.      memory available.
  121.  
  122.  
  123.  
  124. |    A '%' may proceed a number of lines before any commands. These are
  125. |    prompt lines, which are use to query the user to enter a value. These
  126. |    values can the be used to supply parameters to the program which runs.
  127. |    For example:
  128.  
  129. |      B
  130. |      An example of a menu entry which uses a prompt
  131. |      %A Please enter the disk letter to check:;
  132. |      chkdsk %A:;
  133. |      pause
  134.  
  135. |    When this menu option is selected, the user will be presented with
  136. |    the prompt "Please enter the disk letter to check:".  The letter
  137. |    entered will be saved in the variable %A and will be used in the
  138. |    chkdsk command.
  139.  
  140. |    The prompt option can be used in conjunction with the zero-RAM option,
  141. |    by proceeding the first prompt with the '#' symbol:
  142.  
  143. |      C
  144. |      An example of a menu entry which uses a prompt and the zero-RAM option
  145. |      #%A Please enter the disk letter to check:;
  146. |      chkdsk %A:;
  147. |      pause
  148.  
  149.  
  150.  Displaying the Menu
  151.  
  152.      To display the menu that you have just set up, type DOSMENU and
  153.      press RETURN. The file DOSMENU.TXT needs to be in the current
  154.      directory, and the file DOSMENU.COM should be in the current
  155.      directory or in a directory specified by the PATH command. You can
  156.      have the menu displayed when your computer is first turned on by
  157.      putting the command DOSMENU into your AUTOEXEC.BAT file.
  158.  
  159.      To use DOSMENU with more than one menu, you may create menu files
  160.      with names other than DOSMENU.TXT, for example:
  161.  
  162.      Create a file called DOSMENU.TX2, in the same manner as described
  163.      above. Then, execute DOSMENU by typing this command:
  164.  
  165.              dosmenu dosmenu.tx2
  166.      This tells DOSMENU to use the alternate menu instead of DOSMENU.TXT.
  167.      You can create a number of menu files, and then specify which one
  168.      you want to use.
  169.  
  170.      For an example of how to use alternate menus, see the files
  171.      PRINTER.BAT and PRINTER.TXT included with DABUTIL.  PRINTER.BAT
  172.      is a batch file which executes DOSMENU using the menu option
  173.      file PRINTER.TXT. SBE is included in DABUTIL, which is available from
  174.      Simian Id Software.
  175.  
  176.  
  177.  
  178.  
  179.  DOSMENU troubleshooting hints
  180.  
  181.      - If nothing will execute, it may be that DOSMENU cannot find your
  182.        COMMAND.COM file. This will happen if COMMAND.COM is hidden, or
  183.        may happen if you used the SET command to change the COMSPEC
  184.        variable. If COMMAND.COM is hidden because you need to protect
  185.        it, try setting the Read-only attribute instead.
  186.  
  187.      - If a command in DOSMENU.TXT fails, DOSMENU will not attempt to
  188.        execute subsequent commands.
  189.  
  190.      - If you get the error message "Option too long" this can refer to
  191.        the letter, the description, or the commands. The letter must be
  192.        one character, the description can be up to 75 characters. A
  193.        command can be up to 180 characters long. If a command is
  194.        rejected as too long, and it is less than 180 characters, check
  195.        to make sure that the previous command ends with a semi-colon (;).
  196.  
  197.      - If an option executes, but the display returns to the menu to
  198.        quickly to read it, add the PAUSE command as the last command
  199.        for that option.
  200.  
  201.      - If you have a large program which executes correctly from the
  202.        DOS prompt, but will not work from DOSMENU, try this:
  203.  
  204.          DOS commands as entered a prompt:
  205.  
  206.              cd \word5
  207.              word
  208.  
  209.          Use these commands in DOSMENU.TXT:
  210.  
  211.              #cd \word5;
  212.              word
  213.  
  214.          The '#' used as the first character of the first command tells
  215.          DOSMENU to write all the commands for this option to a batch
  216.          file, then execute the batch file. This "zero-RAM" option frees
  217.          the memory used by DOSMENU, so that your large application will
  218.          have enough memory to execute. One example of a large program
  219.          that requires this option is "Where in Time is Carmen SanDiego"
  220.          used with a VGA monitor.
  221.  
  222.          The semicolon on the end of the first command tells DOSMENU that
  223.          the next line of the file is another command for the same option,
  224.          as shown before.
  225.  
  226.          Note that DOSMENU will create a file named '$DOSM01$.BAT' whenever
  227.          it is used, so the presence of this file on your disk is normal.
  228.          This file is used to implement the "zero-RAM" option, but must always
  229.          be present to satisfy DOS when it is used.
  230.  
  231. |        Version 2.10: The file that DOSMENU creates is now named '$DM01$.BAT'.
  232.